<template>
  <div class="edit">
    <van-nav-bar title="设置" left-arrow @click-left="$router.go(-1)" />
    <div class="edit-container">
      <van-cell title="设置密码" is-link to="" />
      <p>
        <van-button type="primary" color="#EB6100" block @click="edit"
          >退出登录</van-button
        >
      </p>
    </div>
  </div>
</template>
<script>
import { Toast } from "vant";

export default {
  methods: {
    edit() {
      Toast.success("退出成功");
      localStorage.clear();
      this.$router.push({ path: "/" });
    },
  },
};
</script>
<style lang="scss">
.edit {
  width: 100%;
  height: 17.5rem;
  background-color: #f0f2f5;
}
.edit-container {
  width: 100%;
  height: 5.5rem;
  background-color: white;
  margin-top: 0.3rem;
  box-sizing: border-box;
  padding: 20px 20px;
  position: relative;
  p {
    margin-top: 2rem;
  }
}
</style>